/*
 * @Author: yanfeixin
 * @Date: 2025-04-05 10:50:38
 * @LastEditTime: 2025-04-07 13:45:26
 * @LastEditors: yanfeixin
 * @Description:
 */
import type { Router } from 'vue-router'
import NProgress from 'nprogress'

NProgress.configure({ easing: 'ease', speed: 500, showSpinner: false })
export function createProgressGuard(router: Router) {
  router.beforeEach(() => {
    NProgress.start()
  })
  router.afterEach(() => {
    NProgress.done()
  })
}
